/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.alag.ci.tagcloud.impl;
import java.util.*;
import com.alag.ci.tagcloud.*;

/**
 *
 * @author Justina Chen <rcfans.163.com>
 */
public class TagCloudImpl implements TagCloud {

    private List<TagCloudElement> elements = null;

    public TagCloudImpl(List<TagCloudElement> elments, FontSizeComputationStrategy strategy) {
        this.elements = elments;
        strategy.computeFontSize(this.elements);
        Collections.sort(this.elements);
    }

    public List<TagCloudElement> getTagCloudElement() {
        return this.elements;
    }
}
